<?
/* $Id: mysqlidb.class.php 52 2011-02-21 13:35:10Z jim2212001@gmail.com $ */
if(!defined('WEBHOME'))
	die ('DO NOT EXECUTE THIS FILE');
class mysqlidb extends mysqli{
	public function __construct($host,$username,$passwd,$dbname){
		parent::__construct($host,$username,$passwd,$dbname);
	}
	public function silentquery($sql){
		return parent::query($sql);
	}
	public function query($sql,$exitOnFail=false){
		if(($res = parent::query($sql)) === false){
			infoMsg('MySQL query error');
			adminMsg('<br />%s',$sql);
			adminMsg('<br />Query Error(%d): %s.',$this->errno,$this->error);
			if($exitOnFail){
				@errMsg(MSG_MYSQL_ERROR,1);
			}
		}
		return $res;
	}
}
